﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OldStyleDiagnosticsSampleApp
{
    public partial class _Default : System.Web.UI.Page
    {
        protected override void OnInit(EventArgs e)
        {
            Enable.Click += new EventHandler(Enable_Click);
            Disable.Click += new EventHandler(Disable_Click);
            base.OnInit(e);
        }

        void Disable_Click(object sender, EventArgs e)
        {
            TraceIt.DisableTrace();
        }

        void Enable_Click(object sender, EventArgs e)
        {
            TraceIt.EnableTrace();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            TraceIt.App.TraceInformation("Page has loaded");
        }
    }
}
